home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Learn Microsoft Visual Basic 6.0 Now
/
Learn Microsoft Visual Basic 6.0 Now (Microsoft Press)(X03-58607)(1998).ISO
/
media
/
chap06
/
b06d015.cc2
< prev
Wrap
Text File
|
1998-06-07
|
1KB
|
25 lines
0, Your assignment in Lab 6 is to create a
3, program that uses a timer object to
6, regulate the time allowed for entering a
8, password. Your program solution should
11, include a descriptive label object, a text
14, box object, a timer object, and a Try
18, Password button. When the program runs, a
24, dialog box should appear that gives the
25, user 15 seconds to enter the correct
27, password. In this example, the correct
29, password is Secret. If they answer
32, incorrectly, a message should appear notifying
35, them so. But if they answer correctly,
42, Visual Basic should display a message that
44, welcomes them to the system. Now, I'll
47, try running the program again to
49, demonstrate the Time Out function. If the user
53, fails to enter the correct password in 15
55, seconds, the message, "Sorry, your time
58, is up," is displayed by the
59, Timer1_Timer event procedure. As you can see, this
64, password protection exercise clearly
67, demonstrates the egg timer functionality of
70, the Visual Basic Timer control.
72, END